- File > Settings > Languages & Frameworks > PHP > Blade
- Uncheck
use default settings
- Directives > +
- Name
livewire
- Prefix
<?php '', [
- Suffix
])?>
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My steps to: | |
# Convert DVD Video to MPEG-4 in MKV without GUI, using only CLI (Command Line Interface) tools. | |
# No need for MeGUI, Avisynth, Handbrake etc.. | |
# ------------------------------------------------------------------------------ | |
# Tools needed: `mediainfo`, `ffmpeg` & `ffprobe`, `x264`, `mkvmerge`, `mplayer` (optional). | |
# Google for them. Use latest versions. Windows tip: avoid Cygwin and get | |
# the official builds, x64, when possible. | |
# Before start use `mediainfo` & `ffprobe` and note down informations about the source material: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
zparseopts -D -E - {p,-rom-path}:=rompath || return 1 | |
scandir=${${${rompath[-1]:a}:-`eval print $( mame -showconfig | awk '$1=="rompath" { $1=""; print $0 }' )`}} | |
if [[ ! -d $scandir ]]; then | |
printf "rom path not found:%s\n" "$scandir" >&2 | |
return 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is a port of GPT Newspaper to LangGraph JS, adapted from the original Python code. | |
* | |
* https://github.com/assafelovic/gpt-newspaper | |
*/ | |
import { HumanMessage, SystemMessage } from "@langchain/core/messages"; | |
import { ChatOpenAI } from "@langchain/openai"; | |
import { StateGraph, END } from "@langchain/langgraph"; | |
import { RunnableLambda } from "@langchain/core/runnables"; | |
import { TavilySearchAPIRetriever } from "@langchain/community/retrievers/tavily_search_api"; |
- PROPAGATION_REQUIRES_NEW starts a new, independent "inner" transaction for the given scope. This transaction will be committed or rolled back completely independent from the outer transaction, having its own isolation scope, its own set of locks, etc. The outer transaction will get suspended at the beginning of the inner one, and resumed once the inner one has completed.
Such independent inner transactions are for example used for id generation through manual sequences, where the access to the sequence table should happen in its own transactions, to keep the lock there as short as possible. The goal there is to avoid tying the sequence locks to the (potentially much longer running) outer transaction, with the sequence lock not getting released before completion of the outer transaction.
- PROPAGATION_NESTED on the other hand starts a "nested" transaction, which is a true subtransaction of the existing one. What will happen is that a savepoint will be taken at the start of the nested transaction. I
It "types" the contents of the clipboard.
Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.
- One example is in system password fields on OSX.
- Sometimes you're working in a VM and the clipboard isn't shared.
- Other times you're working via Remote Desktop and again, the clipboard doesn't work in password boxes such as the system login prompts.
- Connected via RDP and clipboard sharing is disabled and so is mounting of local drives. If the system doesn't have internet access there's no easy way to get things like payloads or Powershell scripts onto it... until now.
The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="main.css"> | |
<script src="bundle.js" async></script> | |
</head> | |
<body> | |
<div data-controller="toggler"> | |
<label>Toggle Me</label> |
setup variables for commands
echo -e "\n
export image=redroid/redroid:11.0.0-amd64
export image_tar=${HOME}/redroid:11.0.0-amd64" >> ${HOME}/.bashrc
source ${HOME}/.bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -ne 3 ]; then | |
echo "usage: sh thread-analyze.sh <pid> <number-of-dumps> <interval>" | |
exit | |
fi | |
count=$2 | |
for i in `seq 1 $count`; | |
do | |
jstack -l $1 > thread_dump_`date "+%F-%T"`.txt & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Get entry point from N64 ROM | |
dd if=test.z64 bs=1 skip=8 count=4 of=entrypoint >& /dev/null | |
# Convert entrypoint to little endian | |
#mips-elf-objcopy -I binary -O binary --reverse-bytes=4 entrypoint entrypoint | |
# Construct an ELF | |
mips-elf-objcopy -I binary test.z64 -O elf32-bigmips -B mips --adjust-section-vma .data+0x80000000 foo.elf | |
# Patch to MIPS III | |
printf '\x20\x00\x00\x00' | dd bs=1 seek=36 count=4 conv=notrunc of=foo.elf >& /dev/null |
NewerOlder